<template>
    <div id="RecordDetail">
        <mt-header fixed :title="this.$route.name">
            <mt-button icon="back" @click.native="$router.go(-1);" slot="left">返回</mt-button>
        </mt-header>
        <div class="showResult lay" style="padding:0">
            <div class="contentResult">
                <qin-you-z-j :isWinner="item.Score1==maxScore" :key="index" v-for="(item,index) in arr">
                    <img :src="item.HeadImg==''?require('./../../../assets//img/nopic.png'):item.HeadImg" slot="icon">
                    <div slot="content">
                        <p>玩家昵称 : <span class="time">{{item.CreateName}}</span></p>
                        <p>Id : <span class="time">{{item.UserID1}}</span></p>
                        <p>积分 : <span class="time">{{item.Score1}}</span></p>
                    </div>
                </qin-you-z-j>
            </div>
        </div>
    </div>
</template>
<script>
    import QinYouZJ from '../../../components/QinyouView/QinYouZJ'
     import {
        MessageBox
    } from 'mint-ui'
    export default {
        name: 'RecordDetail',
        data() {
            return {
                arr: [],
                maxScore: 0
            }
        },
        components: {
            QinYouZJ
        },
        methods: {
            initView(id) {
                let getData = {
                    params: {
                        'functionname': "QYExploitsDetail",
                        body: JSON.stringify({
                            id: id
                        })
                    }
                }
                this.$http.get(`${this.baseUrl}/Main/GetData`, getData).then(response => {
                    //console.log(response);
                    let data = response.data;
                    if (data.code == 1) {
                        this.maxScore = data.body[0].Score1;
                        this.arr = data.body;
                    }else{
                        MessageBox("提示",data.msg);
                    }
                })
            }
        },
        created() {
            let id = this.$route.params.id;
            this.initView(id);
        },
        mounted() {}
    }
</script>

